package com.jch.dm.chapter_4_factory_method;

import com.jch.dm.chapter_4_factory_method.framework.Factory;
import com.jch.dm.chapter_4_factory_method.framework.Product;
import com.jch.dm.chapter_4_factory_method.idcard.IDCardFactory;

/**
 * @author: jch
 * 测试工厂模式 示例程序
 **/
public class Main {

    public static void main(String[] args) {
        Factory factory = new IDCardFactory();
        Product card1 = factory.create("小明");
        Product card2 = factory.create("小红");
        Product card3 = factory.create("小刚");
        card1.use();
        card2.use();
        card3.use();
    }
}
